#include<vector>
#include<iostream>
using namespace std;
//int main()
//{
//	vector<int>s1;
//	s1.push_back(1);
//	s1.push_back(2);
//	s1.push_back(3);
//	s1.push_back(4);
//	vector<int>s2(10, 1);
//	vector<int>s3(s1.begin(),s1.end());
//	for (size_t i = 0; i < s3.size(); i++)
//	{
//		cout << s3[i] << endl;
//	}
//	vector<int>::iterator it =s3.begin();
//	for (auto a : s1)
//	{
//		cout << a<<endl;
//	
//	while (it != s3.end())
//	{
//		cout << *it;
//		it++;
//	}
//	return 0;
//}
int main()
{
	vector<int>v1;
	vector<int>s1;
	s1.reserve(100);
	size_t old = s1.capacity();
	cout << old << endl;
	for (size_t i = 0; i < 100; i++)
	{
		s1.push_back(i);
		if (old != s1.capacity())
		{
			cout << s1.capacity() << " ";
			old = s1.capacity();
		}
	}
	cout << "\n";
	s1.insert(s1.begin() + 3, 10000);
	//cout << s1.size() << endl;
	//cout << s1.capacity() << endl;
	/*for (size_t k = 0; k < 101; k++)
	{
		cout << s1[k] << " ";
	}*/
	auto s = find(s1.begin(), s1.end(), 5);
	s1.insert(s, 100);
	/*for (auto a:s1)
	{
		cout << a << " ";
	}*/

	//int x;
	//cin>>x ;
	//auto w= find(s1.begin(), s1.end(), x);
	s1.erase(s1.end() - 1);
	for (auto a : s1)
	{
		cout << a << " ";
	}
	return 0;
}